<?php

namespace Drupal\wx_mini_tmplmsg\Entity;

use Entity;

class WxMiniTmplmsgIds extends Entity {

  public $id;

  public $uid;

  public $type;

  public $id_string;

  public $count = 0;

  public $validity;

  function __construct($values = []) {
    parent::__construct($values, 'wx_mini_tmplmsg_ids');
  }

  public function save() {
    //如果是开发工具生成的 formid 不存储
    if ($this->id_string == 'the formId is a mock one') {
      return FALSE;
    }
    return parent::save();
  }
}
